package com.example.test1.service;

import com.example.test1.entity.Student;
import com.example.test1.mapper.StudentMapper;
import org.apache.ibatis.annotations.Mapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Mapper
@Service
public class StudentService {
    private static final Logger logger = LoggerFactory.getLogger(StudentService.class);

    @Autowired
    private StudentMapper studentMapper;

    public Student getStudentById(int id) {
        Student student = studentMapper.findById(id);
        logger.info("Student retrieved: {}", student);
        return student;
    }

    // 添加其他增删改查方法
}